//
//  main.m
//  base_m_11_protocol
//
//  Created by China Dragon on 2023/7/8.
//

/*
 Objective-C 中的协议（Protocol）
 https://www.jianshu.com/p/548c97112e30
 */
#import <Foundation/Foundation.h>
#import "Button.h"
#import "ButtonListen.h"
#import "MyListen.h"
int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        Button *btn = [[Button alloc]init];
        ButtonListen *listen = [[ButtonListen alloc]init];
        btn.delegate = listen;
        
        //点击按钮
        btn.click;
        
        Button *btn2 = [[Button alloc]init];
        MyListen *mylisten = [[MyListen alloc]init];
        btn2.delegate = mylisten;
        btn2.click;
    }
    return 0;
}
